CSEG3060 Course home Portal
UPES · University of Tomorrow
CSEG3060 — Research Methodology in Computer Science · L-T-P-C 3-0-0-3
Unit I · Lecture 6
Data Collection and Analysis
Data types, collection methods, sampling, instrumentation and analysis · B.Tech. (CSE) · Dr. Mohsin Furkh Dar
CO2 Quantitative & qualitative Sampling Instrumentation Descriptive stats Inferential stats
Course outcome addressed — CO2

Utilise various investigative approaches and methodologies for problem-solving in computing science research.

Data collection and analysis constitute the empirical heart of any investigation. The formulation of a research problem provides intellectual direction, but it is the systematic acquisition and rigorous examination of data that transforms a conceptual inquiry into verifiable knowledge.

How to use these notes

Three items recur in examinations: the four measurement scales (Section 2.1), the sampling techniques and the sample-size formula (Section 4), and choosing the right statistical test for a described scenario (Section 7.1).

Learn the formulae with their symbol definitions. Examiners ask you to state the formula, define every symbol, and then interpret the result in one sentence — all three steps carry marks.

1. Learning Objectives

2. The Nature and Classification of Research Data

2.1 Quantitative Data and Measurement Scales

Quantitative data are expressed numerically and can be subjected to arithmetic operations and statistical analysis. In computing, examples include algorithm response times in milliseconds, memory consumption in megabytes, protocol throughput in packets per second, and classifier accuracy as a percentage. They are further classified as discrete (countable, often integers — the number of concurrent users on a web server) or continuous (any value within a range — execution time, signal strength).

ScaleDescriptionExample in CS research
NominalCategories without orderProgramming language used (Python, Java, C++)
OrdinalOrdered categoriesLikert ratings of usability (1 = Poor to 5 = Excellent)
IntervalEqual intervals, no true zeroTemperature in Celsius during a server test
RatioEqual intervals with a true zeroExecution time in seconds

2.2 Qualitative and Mixed Data

Qualitative data describe characteristics, perceptions or experiences in non-numeric form: interview transcripts, open-ended survey responses, observational notes, case study narratives. They are indispensable in human–computer interaction, software engineering practice research and the study of ethical implications of AI. Qualitative data may be textual, visual or auditory, and typically require coding and thematic interpretation rather than statistical summarisation.

Mixed data integrate numerical measurement with contextual qualitative insight to provide a richer understanding. This methodological pluralism is increasingly common in design science research and user studies.

3. Sources and Methods of Data Collection

3.1 Primary Data Collection

Primary data are collected directly by the researcher for the problem at hand. They offer high relevance but require greater investment in time, cost and effort.

3.2 Secondary Data Collection

Secondary data consist of information already gathered and recorded by others:

Secondary data are cost-effective and time-efficient, but the researcher must evaluate their relevance, accuracy, timeliness and methodological soundness before use.

4. Sampling Techniques

Because it is rarely feasible to examine every element of a population, researchers rely on samples. The validity of findings depends critically on the sampling strategy.

4.1 Probability Sampling

Each member of the population has a known, non-zero chance of selection.

4.2 Non-Probability Sampling

Selection rests on the researcher's judgement or convenience rather than random assignment.

4.3 Determining Sample Size

Sample-size calculations balance statistical power, confidence level, acceptable margin of error and population variability. A frequently used formula for estimating a proportion is:

sample size for a proportionn = Z² · p · (1 − p) / e²

where Z is the standard normal value for the desired confidence level (1.96 for 95% confidence), p is the estimated proportion (commonly 0.5 for maximum variability), and e is the acceptable margin of error.

Worked figure

To estimate a population proportion within ±5% at 95% confidence with p = 0.5, a sample of approximately 385 respondents is required.

5. Instrumentation, Reliability and Validity

5.1 Measurement Instruments

A research instrument is the tool used to capture observations. The principal instruments in computing research are:

5.2 Reliability and Validity

The credibility of collected data rests on two psychometric properties.

Reliability is the consistency of measurements across time, instruments or raters. The most common coefficient is Cronbach's alpha:

Cronbach's alphaα = [ k / (k − 1) ] · ( 1 − Σσ²Yi / σ²X )

where k is the number of items, σ²Yi the variance of item i, and σ²X the total variance. Values of α ≥ 0.7 are generally considered acceptable.

Validity is the degree to which an instrument measures what it purports to measure:

Pre-testing. Before deployment, instruments should be piloted on a small sample to identify ambiguities, technical errors and timing issues. Feedback from the pilot refines the instrument for the main study.

6. Data Preparation

Raw data are rarely suitable for immediate analysis. Preparation involves six steps:

  1. Editing — detecting and correcting errors, omissions and inconsistencies.
  2. Coding — assigning numerical or symbolic labels to responses, especially for qualitative and categorical data.
  3. Data entry — transferring data into digital formats, often spreadsheets or statistical software.
  4. Transcription — converting audio recordings of interviews into text.
  5. Cleaning — handling missing values through imputation or exclusion, detecting outliers, standardising formats.
  6. Tabulation — organising data into structured tables for inspection.

7. Data Analysis

7.1 Quantitative Analysis

Descriptive statistics summarise the salient features of a dataset. Measures of central tendency are the mean, median and mode:

the sample meanx̄ = (1/n) Σi=1..n xi

Measures of dispersion are the range, variance and standard deviation:

the sample variances² = [ 1 / (n − 1) ] Σi=1..n ( xi − x̄ )²

Measures of shape — skewness and kurtosis — describe asymmetry and peakedness, and are complemented by frequency distributions and visual representations: histograms, box plots, scatter plots and bar charts.

Inferential statistics allow generalisation from a sample to a broader population. Hypothesis testing formulates a null hypothesis H0 and an alternative H1, then computes a test statistic and a corresponding p-value.

independent-samples t-statistict = ( x̄1 − x̄2 ) / √( s²1/n1 + s²2/n2 )
chi-square, O observed and E expectedχ² = Σ ( Oi − Ei )² / Ei
Pearson correlation coefficientr = Σ( xi − x̄ )( yi − ȳ ) / √[ Σ( xi − x̄ )² Σ( yi − ȳ )² ]

7.2 Qualitative Analysis

Software tools that assist qualitative analysis include NVivo, ATLAS.ti and MAXQDA.

7.3 Mixed-Methods Analysis

Mixed-methods studies integrate quantitative and qualitative strands. Analysis proceeds in parallel, with results triangulated to enrich interpretation. Common designs are concurrent triangulation, sequential explanatory and sequential exploratory.

8. Interpretation of Data

Interpretation is the intellectual bridge between analysis and conclusion. It involves relating findings to the hypotheses, questions or objectives; comparing results with prior studies and theoretical expectations; identifying patterns, anomalies and unexpected observations; acknowledging limitations in data, methods and generalisability; and offering explanations and implications.

Disciplined interpretation

Interpretation must avoid overreaching conclusions that exceed the empirical evidence or the scope defined at the outset of the study. Lecture 7 develops this in depth.

9. Worked Illustration: Sorting Algorithm Performance

The integrated pipeline

A researcher investigates the claim that quicksort outperforms merge sort on average for random integer arrays of size n ≤ 106.

  1. Data collection. Implement both algorithms, generate 100 random integer arrays at each of several sizes (n = 104, 105, 106), and record execution times in milliseconds using a benchmarking harness.
  2. Data preparation. Remove outliers attributable to background processes; average times across runs.
  3. Analysis. Compute descriptive statistics for each algorithm at each size; perform a paired-samples t-test at α = 0.05.
  4. Interpretation. If the mean difference is significant and the effect size meaningful, conclude empirical support for the hypothesis within the tested conditions — noting that generalisation to other distributions, such as nearly sorted or reverse sorted, requires further experiments.

10. Common Errors in Data Collection and Analysis

11. Summary

This lecture surveyed the principal elements of data collection and analysis: the distinction between qualitative and quantitative data, primary and secondary sources, sampling strategies, measurement instruments, and the psychometric criteria of validity and reliability. It then addressed data preparation, descriptive and inferential statistical methods, qualitative analytical techniques, and the interpretive practices that culminate in research conclusions. Mastery of these methods equips the computer science researcher to generate evidence that is both credible and meaningful.

12. Practice and Review Questions

  1. Differentiate between primary and secondary data, providing two computing examples of each. 4 marks
  2. A researcher wishes to estimate the average time students spend daily on programming practice, with a margin of error of ±10 minutes at 95% confidence. Assuming a population standard deviation of 30 minutes, compute the required sample size using n = ( Z · σ / e )². 5 marks
  3. Explain the difference between reliability and validity. Why is a measure that is reliable not necessarily valid? 5 marks
  4. Describe three situations in which qualitative methods are preferable to quantitative methods in computing research. 6 marks
  5. A study compares the execution times of three sorting algorithms across 50 test cases each. Which statistical test is most appropriate, and why? State the null and alternative hypotheses. 6 marks
  6. What is stratified sampling? Under what circumstances is it more appropriate than simple random sampling? 5 marks
  7. Discuss three common errors in data analysis and how they may be mitigated. 6 marks
  8. Describe the role of pilot testing in questionnaire design. 4 marks

13. Suggested Readings

CSEG3060 Research Methodology in Computer Science · Unit I · Lecture 6 student notes · Dr. Mohsin Furkh Dar · School of Computer Science, UPES. Companion slide deck: related slides.